package FlowGram.Application.CommandHost.FinchActionListeners;

import java.awt.event.ActionEvent;

import javax.swing.JFrame;
import javax.swing.JOptionPane;

import FlowGram.Application.Parser.Actions.Chirp;
import FlowGram.Application.Parser.Actions.Control.Comment;

public class CommentListener extends FinchActionListener {

	JFrame frame;
	
	Comment commentAct;
	
	public CommentListener(JFrame frame){
		this.frame = frame;
	}
	
	
	@Override
	public void actionPerformed(ActionEvent e) {
		// TODO Auto-generated method stub
		commentAct = new Comment();


		String s = (String)JOptionPane.showInputDialog(
				frame,
				"Comment:\n",
				"Create Comment",
				JOptionPane.QUESTION_MESSAGE);

		commentAct.setCommentText(s);
		
		addCode(commentAct);

	}
}
